package com.sm.user.feigns;

import com.sm.tool.entity.po.Tickets_;
import com.sm.user.feigns.fallback.TicketFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.HttpMethod;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @program: practice
 * @description:
 * @author: liqitian.
 * @create: 2019-11-27 16:56
 **/

@FeignClient(value = "sm-ticket", fallback = TicketFeignClientFallBack.class)
@RequestMapping("api/v2/ticket")
public interface TicketFeignClient {

    @RequestMapping(value = "/query_like_ticket_code", method = RequestMethod.POST)
    Tickets_ queryLikeTicketCode(
            @RequestParam("ticketCode") String ticketCode
    );

    @RequestMapping(value = "/query_ticket_List_by_Ids",method = RequestMethod.POST)
    List<Tickets_> queryTicketListByIds(
            @RequestParam("ticketIds") Long[] ticketIds
    );
}
